<?php

App::uses('AppModel', 'Model');
class Payee extends AppModel{
    public $name = 'Payee';
    
    public $hasMany = array(
        'File' => array(
            'className' => 'File',
            'order' => 'File.type ASC'
        )
    );
    
    public $validate = array(
        'eng_name' => array(
            'rule'    => array('minLength', '2'),
            'required'   => true,
        ),
        'chi_name' => array(
            'rule'    => array('minLength', '2'),
            'required'   => true,
        ),
        'bank_account_no' => array(
            'rule'    => array('minLength', '2'),
            'required'   => true,
        ),
        'phone' => array(
            'rule'    => array('minLength', '2'),
            'required'   => true,
        ),
        'email' => 'email',/*
        'recorded_by' => array(
            'rule'    => array('minLength', '5'),
            'required'   => true,
        ),
        'last_created_by' => array(
            'rule'    => array('minLength', '5'),
            'required'   => true,
        )*/
    );
}

